<?php foreach ($list_mk as $row) {$kelas = $row->kelas; $id_m_th_ajaran = $row->id_m_th_ajaran; $th_ajaran = $row->th_ajaran;}?>
<table class="table table-condensed" id="th_ajaran">
  <thead>
	<tr>
		<th width="30">#</th>
		<th width="80">NIT</th>
		<th>Nama Lengkap</th>
		<th>Jenis Kelamin</th>
		<th>Alamat</th>
	</tr>
  </thead>
  <tbody>
	<?php 
		if(count($list)>0){
			$i = 1; 
			foreach ($list as $row) {
	?>
	<tr class="hover">
		<td><?php echo $i++ ?></td>
		<td><?php echo $row->id_m_tholabah; ?></td> 
		<td><?php echo $row->nama_lengkap; ?></td> 
		<td><?php echo $row->jk; ?></td>
		<td>
		<?php echo $row->alamat; ?>
		<?php if($id_m_th_ajaran = id_ta_aktif()){?>
		<a class="editorLink pull-right" data-reveal-id="delModal" nama="<?php echo $row->nama_lengkap; ?>" 2nd="<?php foreach ($list_mk as $row_mk) {echo $row_mk->kelas.' - '.$row_mk->th_ajaran;}?>" hpid="<?php echo $row->id_b_kelas;?>" data-reveal><span class="glyphicon glyphicon-floppy-remove"></span></a>
		<?php } ?>
	</td>
	</tr>
	<?php
			}
		}else{
	?>
	<tr>
		<td colspan="6"><center>Belum ada pembagian kelas siswa pada kelas <?php echo $kelas.' - '.$th_ajaran;?> </center></td>
	</tr>
	<?php
		}
	?>
  </tbody>
</table>